<h1>Listing documents</h1>
<%= render :partial=> 'layouts/datatable'%>
<table id="list_table" cellpadding="5" cellspacing="0" border="2" width="100%">
  <thead>
    <tr>
      <th>Title</th>
      <th>Description</th>
      <th> Assigned clients</th>
      <th> Status</th>
      <th>Download</th>
      <th>Upload</th>
      </tr>
  </thead>
  <tbody>

<% @doc_clients.each do |document| %>
  <tr>
    <td><%= get_document_title(document) if ! get_document_title(document).nil? %></td>
    <td><%= get_document_desc(document) if  !get_document_desc(document).nil?%></td>
    <td><%= get_assigned_client(document) if ! get_assigned_client(document).nil? %></td>
    <td><%= document.status.humanize unless document.status.nil? %>
      <% if document.status == "Pending" %>
        <%= link_to "review the doc" , show_review_document_path(document) %>
      <% end %>
    </td>
    <td><%= link_to 'Download' , download_document_path(document)%></td>
    <td><%= link_to 'Upload',  upload_document_path(document) %></td>
  </tr>
<% end %>
</tbody>
</table>

<br />




